package com.twu.biblioteca;

/**
 * Created by abhishekpuri on 10/7/14.
 */
public class Movie {

    private String _Name;
    private short _Year;
    private String _Director;
    private short _Rating;

    public Movie(String name, short year, String director) {
        _Name=name;
        _Year=year;
        _Director=director;
        _Rating=0;              //Rating of 0 means unrated
    }

    public Movie(String name, short year, String director, short rating)
    {
        _Name=name;
        _Year=year;
        _Director=director;
        _Rating=rating;
    }

    public String getSummary() {
        return _Name + "(" + _Year + ") by " + _Director + "\t\t" + (_Rating==0?"Unrated":_Rating);
    }

    public String getName() {
        return _Name;
    }

}
